:: Copyright (c) xqkeji.cn. All rights reserved.
:: Author: Zhang Wenhao
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
::     http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
@echo off
setlocal enabledelayedexpansion

set "script_dir_with_slash=%~dp0"
set "HOME_DIR=%script_dir_with_slash:~0,-1%"

set "NSSM_PATH=%HOME_DIR%\bin\nssm.exe"

if not exist "%NSSM_PATH%" (
	echo "error not found nssm.exe"
	pause
	exit /b 1
)

%NSSM_PATH% stop wnmmp-nginx
%NSSM_PATH% remove wnmmp-nginx confirm

%NSSM_PATH% stop wnmmp-mongodb
%NSSM_PATH% remove wnmmp-mongodb confirm

%NSSM_PATH% stop wnmmp-mysql
%NSSM_PATH% remove wnmmp-mysql confirm

%NSSM_PATH% stop wnmmp-php-cgi
%NSSM_PATH% remove wnmmp-php-cgi confirm